package pattern.behavioral.command.simple;

/**
 * @author: chaoyang.ren  
 * @date:Jun 9, 2017  
 * @time:11:16:45 AM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class FanOnCommand implements Command {

	private Fan fan;
	
	public FanOnCommand(Fan fan){
		this.fan = fan;
	}
	
	public void execute() {
		fan.fanOn();
	}

	public void cancel() {
		fan.fanOff();
	}

	public Fan getFan() {
		return fan;
	}

	public void setFan(Fan fan) {
		this.fan = fan;
	}

}

